import request from '@/utils/request';

// 查询商品基本信息列表
export function listGoods(params) {
	return request({
		url: '/api/pc/ptGoods/list',
		method: 'get',
		params,
	});
}

// 查询商品基本信息详细
export function getGoods(id) {
	return request({
		url: '/api/pc/ptGoods/getInfo',
		method: 'post',
		data: id,
	});
}

// 新增商品基本信息
export function addGoods(data) {
	return request({
		url: '/api/pc/ptGoods/batchAdd',
		method: 'post',
		data: data,
	});
}

// 编辑商品基本信息
export function updateGoods(data) {
	return request({
		url: '/api/pc/ptGoods/edit',
		method: 'post',
		data: data,
	});
}

// 删除商品基本信息
export function delGoods(id) {
	return request({
		url: '/api/pc/ptGoods/remove',
		method: 'post',
		data: id,
	});
}

// 导出商品基本信息
export function exportGoods(query) {
	return request({
		url: '/api/pc/ptGoods/export',
		method: 'post',
		data: query,
	});
}
// 最新商品
export function newGoods(query) {
	return request({
		url: '/api/pc/ptGoods/newGoods',
		method: 'post',
		data: query,
	});
}

export const getInfoGoodsVo = (id) => {
	return request({
		url: '/api/pc/ptGoods/getInfoGoodsVo',
		method: 'post',
		data: id,
	});
};

export const updateGoodsPo = (data) => {
	return request({
		url: '/api/pc/ptGoods/updateGoodsPo',
		method: 'post',
		data: data,
	});
};
export const queryPtAdminInfo = (data) => {
	return request({
		url: '/api/pc/ptGoods/queryPtAdminInfo',
		method: 'post',
		data: data,
	});
};
export const getPtHistoricalRecord = (data) => {
	return request({
		url: '/api/pc/ptGoods/ptHistoricalRecord',
		method: 'post',
		data: data,
	});
};
export const queryPtHistoryList = (data) => {
	return request({
		url: '/api/pc/ptGoods/queryPtHistoryList',
		method: 'post',
		data: data,
	});
};
export const queryPtHistoryInfoList = (data) => {
	return request({
		url: '/api/pc/ptGoods/queryPtHistoryInfoList',
		method: 'post',
		data: data,
	});
};
export const exportPtHistoryInfoList = (data) => {
	return request({
		url: '/api/pc/ptGoods/exportPtHistoryInfoListt',
		method: 'post',
		data: data,
	});
};
